<template>
  <view class="loading-container" v-if="show">
    <view class="loading-content">
      <view class="loading-image-wrapper">
        <image class="loading-image" src="/static/loading/WXloading.gif" mode="aspectFit"></image>
      </view>
      <text class="loading-text">加载中...</text>
    </view>
  </view>
</template>

<script setup lang="ts">
import { defineProps } from 'vue';

defineProps({
  show: {
    type: Boolean,
    default: false
  }
});
</script>

<style>
.loading-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.loading-image-wrapper {
  background-color: #ffffff;
  border-radius: 20px;
  padding: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.loading-image {
  width: 150px;
  height: 150px;
  border-radius: 15px;
}

.loading-text {
  font-size: 16px;
  color: #666;
  font-weight: 500;
}
</style> 